﻿//-------------------------------------------------------------------------------------------------
// <copyright file="IStockDataProvider.cs" company="Andrew Craig Keller">
//  Copyright (c) Andrew Craig Keller.  All rights reserved.
// </copyright>
//-------------------------------------------------------------------------------------------------

namespace StockQuoteServices
{
    using System;
    using System.Collections.Generic;
    using StockQuoteServices.Contracts;

    /// <summary>
    /// Populates stock and price history data from a third-party data provider.
    /// </summary>
    internal interface IStockDataProvider
    {
        /// <summary>
        /// Gets a <see cref="Stock"/> object populated with basic data and the last traded price
        /// for the stock with the given ticker symbol.
        /// </summary>
        /// <param name="tickerSymbol">
        /// the ticker symbol of the stock for which data is to be retrieved
        /// </param>
        /// <returns>
        /// a <see cref="Stock"/> object populated with basic data and the last traded price for
        /// the stock with the given ticker symbol
        /// </returns>
        Stock GetStockInfo(string tickerSymbol);

        /// <summary>
        /// Gets an <see cref="IList{T}"/> of <see cref="StockHistoricalPrice"/> objects for the
        /// stock with the given ticker symbol for the given date range.
        /// </summary>
        /// <param name="tickerSymbol">
        /// the ticker symbol of the stock for which data is to be retrieved
        /// </param>
        /// <param name="priceRangeStart">
        /// the starting date of the time period for which price history should be retrieved
        /// </param>
        /// <param name="priceRangeEnd">
        /// the ending date of the time period for which price history should be retrieved
        /// </param>
        /// <returns>
        /// an <see cref="IList{T}"/> containing a <see cref="StockHistoricalPrice"/> for each
        /// trading day that falls within the specified price range, inclusive
        /// </returns>
        IList<StockHistoricalPrice> GetStockPriceHistory(
            string tickerSymbol,
            DateTime priceRangeStart,
            DateTime priceRangeEnd);
    }
}
